package pt.iscte.dcti.pr.dbo;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;

import pt.iscte.dcti.pr.model.Comentario;

public class ComentarioConnection {
	private ConnectDataBase dbCon = new ConnectDataBase();

	public void addComentario(Comentario comentario) {
		Connection con = null;

		try {
			dbCon = new ConnectDataBase();
			con = dbCon.mySqlConnection();
			
			String query = "insert into comentario(livro,avaliacao,comentarioEscrito,nomeEscrita";
			PreparedStatement stmt = con.prepareStatement(query);
			// stmt.setString(1, );
			// stmt.setString(2, );
			// stmt.setString(3, );
			// stmt.setString(4, );

			stmt.executeUpdate();
		} catch (SQLException e) {
			e.printStackTrace();
		} finally {
			dbCon.closeConnection(con);
		}
	}
}
